package org.jeecg.modules.workservice.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.workservice.entity.WorkOrderUser;
import org.jeecg.modules.workservice.entity.WorkService;
import org.jeecg.modules.workservice.mapper.IWorkOrderUserMapper;
import org.jeecg.modules.workservice.mapper.IWorkServiceMapper;
import org.jeecg.modules.workservice.service.IWorkOrderUserService;
import org.jeecg.modules.workservice.service.IWorkServiceService;
import org.jeecg.modules.workservice.vo.WorkOrderUserVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 类名称：WorkOrderUserServiceImpl
 * 类描述：TODO
 * 创建人：zwr
 * 创建时间：2021-08-28   12:22
 */
@Service
public class WorkOrderUserServiceImpl  extends ServiceImpl<IWorkOrderUserMapper, WorkOrderUser> implements IWorkOrderUserService {
    @Resource
    private  IWorkOrderUserMapper iWorkOrderUserMapper;

    /**
     * 根据工单编号查找负责人
     *
     * @param workOrderId
     * @return
     */
    @Override
    public WorkOrderUserVo findWorkOrderUserVo(String workOrderId) {
        return iWorkOrderUserMapper.findWorkOrderUserVo(workOrderId);
    }


    /**
     * 修改人员为负责人
     *
     * @param workOrderId 工单编号
     * @param orderUserId 负责人编号
     * @return
     */
    @Override
    public int updWorkOrderUser(String workOrderId, String orderUserId) {
        return iWorkOrderUserMapper.updWorkOrderUser(workOrderId,orderUserId);
    }
}
